<?php
namespace app\admin\command;
use app\models\ExecuteTaskModel;
use think\console\Command;
use think\console\Input;
use think\console\Output;

class UpdateStatus extends Command
{

    protected function configure(){
        $this->setName('UpdateStatus')->setDescription("定时更新绑定关系.....");
    }
    protected function execute(Input $input, Output $output){


        $date = date("Y-m-d H:i:s");
        $output->writeln('Update the binding......'.$date);
        $this->RefreshStatus();   //刷新数据库标志
    }

    private function RefreshStatus(){
        $ExecuteTaskModel = new ExecuteTaskModel();
        $ExecuteTaskModel->RefreshStatus();
    }
}